﻿using Jay.Sc2.Bof.Lib.State;

namespace Jay.Sc2.Bof.Lib.Action.Terran
{
	public class ActionProduceCommandCenter : ActionProduceFromSCV
	{
		public static ActionProduceCommandCenter Instance = new ActionProduceCommandCenter();
		private ActionProduceCommandCenter() : base(100, 400, 0) { }
		public override TerranState.TerranBuilding GetBuilding(TerranState state) { return state.CommandCenter; }
		public override string EventName { get { return "ActionSpawnCommandCenter"; } }
		public override bool HaveTechnology(IBuildOrder bo) { return true; }
		public override void OnProductionStart(IBuildOrder bo)
		{
			TerranState state = bo.State as TerranState;
			base.OnProductionStart(bo);
			state.TotalBases.Building++;
		}
		public override void OnProductionFinished(IBuildOrder bo)
		{
			TerranState state = bo.State as TerranState;
			base.OnProductionFinished(bo);
			state.TotalBases.Built();
			state.Supply += 11;
		}
	}
}
